.class public final Lcom/google/zxing/client/android/CaptureActivity;
.super Lcom/xingbook/park/activity/BaseActivity;

# interfaces
.implements Landroid/view/SurfaceHolder$Callback;
.implements Lcom/xingbook/ui/x;


# static fields
.field private static final b:Ljava/lang/String;


# instance fields
.field public a:I

.field private c:Lcom/google/zxing/client/android/a/e;

.field private d:Lcom/google/zxing/client/android/c;

.field private e:Lcom/google/zxing/client/android/l;

.field private f:Z

.field private g:Ljava/util/Collection;

.field private h:Ljava/util/Map;

.field private i:Ljava/lang/String;

.field private l:Lcom/google/zxing/client/android/h;

.field private m:Lcom/google/zxing/client/android/b;

.field private n:Lcom/google/zxing/client/android/a;

.field private o:Landroid/view/SurfaceView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-class v0, Lcom/google/zxing/client/android/CaptureActivity;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/google/zxing/client/android/CaptureActivity;->b:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    const/4 v0, 0x1

    iput v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->a:I

    return-void
.end method

.method private a(Landroid/graphics/Bitmap;FLcom/google/zxing/m;)V
    .locals 8

    const/4 v7, 0x2

    const/4 v6, 0x1

    const/4 v0, 0x0

    invoke-virtual {p3}, Lcom/google/zxing/m;->c()[Lcom/google/zxing/o;

    move-result-object v1

    if-eqz v1, :cond_0

    array-length v2, v1

    if-lez v2, :cond_0

    new-instance v2, Landroid/graphics/Canvas;

    invoke-direct {v2, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    new-instance v3, Landroid/graphics/Paint;

    invoke-direct {v3}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f07003f

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getColor(I)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/graphics/Paint;->setColor(I)V

    array-length v4, v1

    if-ne v4, v7, :cond_1

    const/high16 v4, 0x4080

    invoke-virtual {v3, v4}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    aget-object v0, v1, v0

    aget-object v1, v1, v6

    invoke-static {v2, v3, v0, v1, p2}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/o;Lcom/google/zxing/o;F)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    array-length v4, v1

    const/4 v5, 0x4

    if-ne v4, v5, :cond_3

    invoke-virtual {p3}, Lcom/google/zxing/m;->d()Lcom/google/zxing/a;

    move-result-object v4

    sget-object v5, Lcom/google/zxing/a;->o:Lcom/google/zxing/a;

    if-eq v4, v5, :cond_2

    invoke-virtual {p3}, Lcom/google/zxing/m;->d()Lcom/google/zxing/a;

    move-result-object v4

    sget-object v5, Lcom/google/zxing/a;->h:Lcom/google/zxing/a;

    if-ne v4, v5, :cond_3

    :cond_2
    aget-object v0, v1, v0

    aget-object v4, v1, v6

    invoke-static {v2, v3, v0, v4, p2}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/o;Lcom/google/zxing/o;F)V

    aget-object v0, v1, v7

    const/4 v4, 0x3

    aget-object v1, v1, v4

    invoke-static {v2, v3, v0, v1, p2}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/o;Lcom/google/zxing/o;F)V

    goto :goto_0

    :cond_3
    const/high16 v4, 0x4120

    invoke-virtual {v3, v4}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    array-length v4, v1

    :goto_1
    if-ge v0, v4, :cond_0

    aget-object v5, v1, v0

    if-eqz v5, :cond_4

    invoke-virtual {v5}, Lcom/google/zxing/o;->a()F

    move-result v6

    mul-float/2addr v6, p2

    invoke-virtual {v5}, Lcom/google/zxing/o;->b()F

    move-result v5

    mul-float/2addr v5, p2

    invoke-virtual {v2, v6, v5, v3}, Landroid/graphics/Canvas;->drawPoint(FFLandroid/graphics/Paint;)V

    :cond_4
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method private static a(Landroid/graphics/Canvas;Landroid/graphics/Paint;Lcom/google/zxing/o;Lcom/google/zxing/o;F)V
    .locals 6

    if-eqz p2, :cond_0

    if-eqz p3, :cond_0

    invoke-virtual {p2}, Lcom/google/zxing/o;->a()F

    move-result v0

    mul-float v1, p4, v0

    invoke-virtual {p2}, Lcom/google/zxing/o;->b()F

    move-result v0

    mul-float v2, p4, v0

    invoke-virtual {p3}, Lcom/google/zxing/o;->a()F

    move-result v0

    mul-float v3, p4, v0

    invoke-virtual {p3}, Lcom/google/zxing/o;->b()F

    move-result v0

    mul-float v4, p4, v0

    move-object v0, p0

    move-object v5, p1

    invoke-virtual/range {v0 .. v5}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    :cond_0
    return-void
.end method

.method private a(Landroid/view/SurfaceHolder;)V
    .locals 6

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "No SurfaceHolder provided"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/a/e;->a()Z

    move-result v0

    if-eqz v0, :cond_2

    :cond_1
    :goto_0
    return-void

    :cond_2
    :try_start_0
    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v0, p1}, Lcom/google/zxing/client/android/a/e;->a(Landroid/view/SurfaceHolder;)V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    if-nez v0, :cond_1

    new-instance v0, Lcom/google/zxing/client/android/c;

    iget-object v2, p0, Lcom/google/zxing/client/android/CaptureActivity;->g:Ljava/util/Collection;

    iget-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->h:Ljava/util/Map;

    iget-object v4, p0, Lcom/google/zxing/client/android/CaptureActivity;->i:Ljava/lang/String;

    iget-object v5, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    move-object v1, p0

    invoke-direct/range {v0 .. v5}, Lcom/google/zxing/client/android/c;-><init>(Lcom/google/zxing/client/android/CaptureActivity;Ljava/util/Collection;Ljava/util/Map;Ljava/lang/String;Lcom/google/zxing/client/android/a/e;)V

    iput-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_0

    :catch_0
    move-exception v0

    sget-object v1, Lcom/google/zxing/client/android/CaptureActivity;->b:Ljava/lang/String;

    invoke-static {v1, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0

    :catch_1
    move-exception v0

    sget-object v1, Lcom/google/zxing/client/android/CaptureActivity;->b:Ljava/lang/String;

    const-string v2, "Unexpected error initializing camera"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method private f()V
    .locals 2

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/google/zxing/client/android/l;->setVisibility(I)V

    return-void
.end method


# virtual methods
.method a()Lcom/google/zxing/client/android/l;
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    return-object v0
.end method

.method public a(I)V
    .locals 2

    const/4 v0, 0x1

    if-ne p1, v0, :cond_0

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/google/zxing/client/android/CaptureHelpAct;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->startActivity(Landroid/content/Intent;)V

    :goto_0
    return-void

    :cond_0
    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->d(I)V

    goto :goto_0
.end method

.method public a(Lcom/google/zxing/m;Landroid/graphics/Bitmap;F)V
    .locals 7

    const/4 v6, 0x4

    const/4 v3, 0x1

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->l:Lcom/google/zxing/client/android/h;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/h;->a()V

    if-eqz p2, :cond_2

    move v0, v3

    :goto_0
    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->m:Lcom/google/zxing/client/android/b;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/b;->b()V

    invoke-direct {p0, p2, p3, p1}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/graphics/Bitmap;FLcom/google/zxing/m;)V

    :cond_0
    invoke-virtual {p1}, Lcom/google/zxing/m;->a()Ljava/lang/String;

    move-result-object v0

    const-string v2, "http://xingbook.com/a/"

    invoke-virtual {v0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    const/16 v2, 0x16

    invoke-virtual {v0, v2}, Ljava/lang/String;->charAt(I)C

    move-result v4

    const/16 v2, 0x18

    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    sparse-switch v4, :sswitch_data_0

    :cond_1
    :goto_1
    :sswitch_0
    return-void

    :cond_2
    move v0, v1

    goto :goto_0

    :sswitch_1
    const/4 v0, 0x0

    const/16 v4, 0x23

    invoke-virtual {v2, v4}, Ljava/lang/String;->indexOf(I)I

    move-result v4

    const/4 v5, -0x1

    if-le v4, v5, :cond_5

    invoke-virtual {v2, v1, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    add-int/lit8 v0, v4, 0x1

    invoke-virtual {v2, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    :goto_2
    new-instance v2, Landroid/content/Intent;

    const-class v4, Lcom/xingbook/park/activity/OpenBookAct;

    invoke-direct {v2, p0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v4, "com.xingbook.park.BOOK_ID"

    invoke-virtual {v2, v4, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v1, "com.xingbook.park.TO_STORE"

    invoke-virtual {v2, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    if-eqz v0, :cond_3

    const-string v1, "com.xingbook.park.BOOKMARK"

    invoke-virtual {v2, v1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    :cond_3
    invoke-virtual {p0, v2}, Lcom/google/zxing/client/android/CaptureActivity;->startActivity(Landroid/content/Intent;)V

    invoke-virtual {p0, v6}, Lcom/google/zxing/client/android/CaptureActivity;->d(I)V

    goto :goto_1

    :cond_4
    const-string v2, "http://"

    invoke-virtual {v0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "http://app2.xingbook.com//store/getPictureBookDetail.do?isbn="

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    new-instance v0, Landroid/content/Intent;

    const-class v4, Lcom/xingbook/park/activity/WebAct;

    invoke-direct {v0, p0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v4, "title"

    const-string v5, "\u626b\u4e00\u626b"

    invoke-virtual {v0, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v4, "url"

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v4, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v2, "titleColor"

    const/high16 v4, -0x1

    invoke-virtual {v0, v2, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v2, "jsEnabled"

    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string v2, "useHistory"

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->startActivity(Landroid/content/Intent;)V

    invoke-virtual {p0, v6}, Lcom/google/zxing/client/android/CaptureActivity;->d(I)V

    goto :goto_1

    :cond_5
    move-object v1, v2

    goto :goto_2

    nop

    :sswitch_data_0
    .sparse-switch
        0x62 -> :sswitch_1
        0x63 -> :sswitch_0
        0x73 -> :sswitch_0
    .end sparse-switch
.end method

.method public b()Landroid/os/Handler;
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    return-object v0
.end method

.method c()Lcom/google/zxing/client/android/a/e;
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    return-object v0
.end method

.method public d()V
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/l;->a()V

    return-void
.end method

.method public e()Ljava/lang/String;
    .locals 1

    const-string v0, "\u4e8c\u7ef4\u7801\u626b\u63cf"

    return-object v0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 8

    const/16 v3, 0xf5

    const/4 v7, 0x0

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    const/16 v1, 0x80

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v0

    invoke-static {p0}, Lcom/xingbook/c/n;->d(Landroid/app/Activity;)I

    move-result v1

    new-instance v2, Lcom/xingbook/ui/XbLayout;

    invoke-direct {v2, p0}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;)V

    invoke-static {v3, v3, v3}, Landroid/graphics/Color;->rgb(III)I

    move-result v3

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/XbLayout;->setBackgroundColor(I)V

    new-instance v3, Lcom/xingbook/ui/t;

    invoke-direct {v3, p0, p0}, Lcom/xingbook/ui/t;-><init>(Landroid/app/Activity;Lcom/xingbook/ui/x;)V

    const-string v4, "\u626b\u4e00\u626b"

    iput-object v4, v3, Lcom/xingbook/ui/t;->c:Ljava/lang/String;

    const-string v4, "\u5e2e\u52a9"

    iput-object v4, v3, Lcom/xingbook/ui/t;->d:Ljava/lang/String;

    const v4, -0x33ffec

    invoke-virtual {v3, v4}, Lcom/xingbook/ui/t;->setBackgroundColor(I)V

    sget v4, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v3, v7, v7, v0, v4}, Lcom/xingbook/ui/t;->layout(IIII)V

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v3, Landroid/view/SurfaceView;

    invoke-direct {v3, p0}, Landroid/view/SurfaceView;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->o:Landroid/view/SurfaceView;

    iget-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->o:Landroid/view/SurfaceView;

    sget v4, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v3, v7, v4, v0, v1}, Landroid/view/SurfaceView;->layout(IIII)V

    iget-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->o:Landroid/view/SurfaceView;

    invoke-virtual {v2, v3}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v3, Lcom/google/zxing/client/android/l;

    invoke-direct {v3, p0}, Lcom/google/zxing/client/android/l;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    iget-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    sget v4, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v3, v7, v4, v0, v1}, Lcom/google/zxing/client/android/l;->layout(IIII)V

    iget-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    invoke-virtual {v2, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    new-instance v1, Lcom/xingbook/ui/ad;

    invoke-direct {v1, p0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    const-string v3, "\u5c06\u4e8c\u7ef4\u7801/\u6761\u7801\u653e\u5165\u626b\u63cf\u6846\uff0c\u5373\u53ef\u81ea\u52a8\u626b\u63cf\u3002"

    iput-object v3, v1, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const/high16 v3, 0x41f0

    invoke-static {p0}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v4

    mul-float/2addr v3, v4

    iput v3, v1, Lcom/xingbook/ui/ad;->c:F

    const/4 v3, -0x1

    iput v3, v1, Lcom/xingbook/ui/ad;->b:I

    const/16 v3, 0x11

    iput v3, v1, Lcom/xingbook/ui/ad;->d:I

    sget v3, Lcom/xingbook/ui/t;->b:I

    sget v4, Lcom/xingbook/ui/t;->b:I

    int-to-float v4, v4

    const/high16 v5, 0x4270

    invoke-static {p0}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v6

    mul-float/2addr v5, v6

    add-float/2addr v4, v5

    invoke-static {v4}, Ljava/lang/Math;->round(F)I

    move-result v4

    invoke-virtual {v1, v7, v3, v0, v4}, Lcom/xingbook/ui/ad;->layout(IIII)V

    invoke-virtual {v2, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-virtual {p0, v2}, Lcom/google/zxing/client/android/CaptureActivity;->setContentView(Landroid/view/View;)V

    iput-boolean v7, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    new-instance v0, Lcom/google/zxing/client/android/h;

    invoke-direct {v0, p0}, Lcom/google/zxing/client/android/h;-><init>(Landroid/app/Activity;)V

    iput-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->l:Lcom/google/zxing/client/android/h;

    new-instance v0, Lcom/google/zxing/client/android/b;

    invoke-direct {v0, p0}, Lcom/google/zxing/client/android/b;-><init>(Landroid/app/Activity;)V

    iput-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->m:Lcom/google/zxing/client/android/b;

    new-instance v0, Lcom/google/zxing/client/android/a;

    invoke-direct {v0, p0}, Lcom/google/zxing/client/android/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->n:Lcom/google/zxing/client/android/a;

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "orientation"

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->a:I

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->l:Lcom/google/zxing/client/android/h;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/h;->d()V

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onDestroy()V

    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 3

    const/4 v0, 0x1

    sparse-switch p1, :sswitch_data_0

    :goto_0
    invoke-super {p0, p1, p2}, Lcom/xingbook/park/activity/BaseActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    :goto_1
    :sswitch_0
    return v0

    :sswitch_1
    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->d(I)V

    goto :goto_0

    :sswitch_2
    iget-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/google/zxing/client/android/a/e;->a(Z)V

    goto :goto_1

    :sswitch_3
    iget-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v1, v0}, Lcom/google/zxing/client/android/a/e;->a(Z)V

    goto :goto_1

    nop

    :sswitch_data_0
    .sparse-switch
        0x4 -> :sswitch_1
        0x18 -> :sswitch_3
        0x19 -> :sswitch_2
        0x1b -> :sswitch_0
        0x50 -> :sswitch_0
    .end sparse-switch
.end method

.method protected onPause()V
    .locals 1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/c;->a()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    :cond_0
    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->l:Lcom/google/zxing/client/android/h;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/h;->b()V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->n:Lcom/google/zxing/client/android/a;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/a;->a()V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/a/e;->b()V

    iget-boolean v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->o:Landroid/view/SurfaceView;

    invoke-virtual {v0}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v0

    invoke-interface {v0, p0}, Landroid/view/SurfaceHolder;->removeCallback(Landroid/view/SurfaceHolder$Callback;)V

    :cond_1
    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 4

    const/4 v3, 0x0

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    iget v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->a:I

    invoke-virtual {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->setRequestedOrientation(I)V

    const/4 v0, 0x0

    iget v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->a:I

    const/4 v2, 0x1

    if-eq v1, v2, :cond_0

    iget v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->a:I

    const/4 v2, 0x7

    if-ne v1, v2, :cond_1

    :cond_0
    const/16 v0, 0x5a

    :cond_1
    new-instance v1, Lcom/google/zxing/client/android/a/e;

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->getApplication()Landroid/app/Application;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Lcom/google/zxing/client/android/a/e;-><init>(Landroid/content/Context;I)V

    iput-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->e:Lcom/google/zxing/client/android/l;

    iget-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v0, v1}, Lcom/google/zxing/client/android/l;->setCameraManager(Lcom/google/zxing/client/android/a/e;)V

    iput-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->d:Lcom/google/zxing/client/android/c;

    invoke-direct {p0}, Lcom/google/zxing/client/android/CaptureActivity;->f()V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->o:Landroid/view/SurfaceView;

    invoke-virtual {v0}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v0

    iget-boolean v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    if-eqz v1, :cond_2

    invoke-direct {p0, v0}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/view/SurfaceHolder;)V

    :goto_0
    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->m:Lcom/google/zxing/client/android/b;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/b;->a()V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->n:Lcom/google/zxing/client/android/a;

    iget-object v1, p0, Lcom/google/zxing/client/android/CaptureActivity;->c:Lcom/google/zxing/client/android/a/e;

    invoke-virtual {v0, v1}, Lcom/google/zxing/client/android/a;->a(Lcom/google/zxing/client/android/a/e;)V

    iget-object v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->l:Lcom/google/zxing/client/android/h;

    invoke-virtual {v0}, Lcom/google/zxing/client/android/h;->c()V

    iput-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->g:Ljava/util/Collection;

    iput-object v3, p0, Lcom/google/zxing/client/android/CaptureActivity;->i:Ljava/lang/String;

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/google/zxing/client/android/CaptureActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void

    :cond_2
    invoke-interface {v0, p0}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V

    goto :goto_0
.end method

.method public surfaceChanged(Landroid/view/SurfaceHolder;III)V
    .locals 0

    return-void
.end method

.method public surfaceCreated(Landroid/view/SurfaceHolder;)V
    .locals 1

    iget-boolean v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    if-nez v0, :cond_0

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    invoke-direct {p0, p1}, Lcom/google/zxing/client/android/CaptureActivity;->a(Landroid/view/SurfaceHolder;)V

    :cond_0
    return-void
.end method

.method public surfaceDestroyed(Landroid/view/SurfaceHolder;)V
    .locals 1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/zxing/client/android/CaptureActivity;->f:Z

    return-void
.end method
